package com.jd.jobkeeper.server.web.controller;

import com.jd.jobkeeper.server.data.entity.ServerInfo;
import com.jd.jobkeeper.server.scheduler.ServerNode;
import com.jd.jobkeeper.server.service.ServerInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/server")
public class ServerController {

    final ServerInfoService serverInfoService;

    public ServerController(ServerInfoService serverInfoService, ServerNode serverNode) {
        this.serverInfoService = serverInfoService;
    }

    @GetMapping("/all")
    public List<ServerInfo> findAll() {
        return serverInfoService.findAll();
    }

    @GetMapping("/connection")
    public List<String> connection(){
        return null;
    }


}
